package cn.tx.service.Impl;

import cn.tx.dao.GradeDao;
import cn.tx.dao.OrderDao;
import cn.tx.model.Grade;
import cn.tx.model.Order;
import cn.tx.service.GradeService;
import cn.tx.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class OrderServiceImpl implements OrderService {

    @Autowired
    OrderDao orderDao;

    @Override
    public Order findByUserName(String username) {
        return orderDao.findByUserName(username);
    }

    @Override
    public int addOrder(Order order) { return orderDao.addOrder( order);
    }

    @Override
    public List<Order> findList(Map<String, Object> querymap) {
        return orderDao.findList(querymap);
    }

    @Override
    public List<Order> findAll() {
        return orderDao.findAll();
    }

    @Override
    public int findTotal(Map<String, Object> querymap) {
        return orderDao.findTotal(querymap);
    }

    @Override
    public int updateOrderById(Order order) { return orderDao.updateOrderById( order);
    }

    @Override
    public int delete(String ids) {
        return orderDao.delete(ids);
    }

}
